package com.yubest.satoken.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: hweiyu
 * @Date: 2023/10/10 10:56
 */
@RestController
@RequestMapping("/auth/")
public class AuthController {

    @SaCheckPermission("user.add")
    @GetMapping("add")
    public String add() {
        return "add";
    }

    @SaCheckPermission("user.delete")
    @GetMapping("delete")
    public String delete() {
        return "delete";
    }

    @SaCheckPermission("user.update")
    @GetMapping("update")
    public String update() {
        return "update";
    }

    @SaCheckPermission("user.get")
    @GetMapping("get")
    public String get() {
        return "get";
    }

    @SaCheckLogin
    @GetMapping("other")
    public String other() {
        return "other";
    }

}

